package com.vueperson.vueperson.controller;

import com.vueperson.vueperson.entity.Book;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Date;

@RestController
public class BookController {
    @Autowired
    Book book;
    @GetMapping("/book")
    public Book book(){
//        Book book=new Book();
        book.setAuthor("罗贯中");
        book.setId(1);

        book.setPrice(30f);
        book.setPublicationDate(new Date());
        return book;
    }

}
